-- GENERATED SPELL FOR [Storm Tempest] --


function spell0_26045(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(15659,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26045', 3000, 1)
end

function spell1_26045(pUnit, Event) --@Wind Shock,n/a--
pUnit:FullCastSpellOnTarget(31272,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26045', 10000, 1)
end

function Sorts_26045(pUnit, Event)
local choix_sorts_26045 = math.random(0, 1)
if choix_sorts_26045 == 0 then
pUnit:RegisterEvent('spell0_26045', 1, 1)
end
if choix_sorts_26045 == 1 then
pUnit:RegisterEvent('spell1_26045', 1, 1)
end
end

function mob26045_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26045', math.random(1500, 3000), 1)
end

function mob26045_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26045_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26045_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26045, 1, 'mob26045_Action')
RegisterUnitEvent(26045, 2, 'mob26045_Leave')
RegisterUnitEvent(26045, 3, 'mob26045_Kill')
RegisterUnitEvent(26045, 4, 'mob26045_Die')
